package com.example.api;

import com.example.model.User;

import retrofit.Callback;
import retrofit.http.Field;
import retrofit.http.FormUrlEncoded;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.Path;

/**
 * Created by 刘智强 on 2016/9/1.
 */
public interface GetApi {
    //API+参数
    @GET("/users/{user}")
    void getUserInfo(@Path("user") String user, Callback<User> callback);

    @FormUrlEncoded
    @POST("/login")
    void login(@Field("name") String name, @Field("password") String password, Callback<User> callback);
}
